﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OldFramework
{
    /// <summary>
    /// 动物基类
    /// </summary>
    public abstract class AnimalBase
    {
        /// <summary>
        /// 行动
        /// </summary>
        public abstract void Move();

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 种名称
        /// </summary>
        public abstract string CategoryName { get; }

        /// <summary>
        /// 族名称
        /// </summary>
        public abstract string EthnicGroupName { get; }
        /// <summary>
        /// 讲话
        /// </summary>
        public virtual void Talk()
        {

        }

        /// <summary>
        /// 对X讲话
        /// </summary>
        /// <param name="animal"></param>
        public virtual void Talk(AnimalBase animal)
        {

        }
    }




    /// <summary>
    /// 可以讲话的动物
    /// </summary>
    public interface ITalkableAnimal
    {
        //讲话
        void Talk();

        /// <summary>
        /// 对谁讲话
        /// </summary>
        /// <param name="animal"></param>
        void Talk(AnimalBase animal);
    }

    public interface INamedAnimal
    {
        string Name { get; }
    }

    /// <summary>
    /// 可走动的动物
    /// </summary>
    public interface IWalkableAnimal
    {
        /// <summary>
        /// 行走
        /// </summary>
        void Walk();
    }



}
